(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/work/bill/detail" ], {
    "34b1": function(t, e, n) {
        n.r(e);
        var i, o = n("fae5"), a = n.n(o);
        for (i in o) "default" !== i && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(i);
        e.default = a.a;
    },
    6839: function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return a;
        }), n.d(e, "a", function() {
            return i;
        });
        var i = {
            wkQrcode: function() {
                return n.e("components/wk-qrcode/index").then(n.bind(null, "9f28"));
            }
        }, o = function() {
            var t = this, e = (t.$createElement, t._self._c, 1 == t.bill.status && 99 == t.staff.role && 0 <= t.staff.qx.indexOf("yh")), n = e ? 1 == t.bill.status && 99 == t.staff.role && 0 <= t.staff.qx.indexOf("zf") : null;
            t.$mp.data = Object.assign({}, {
                $root: {
                    g0: e,
                    g1: n
                }
            });
        }, a = [];
    },
    b3fa: function(t, e, n) {},
    d31b: function(t, e, n) {
        var i = n("b3fa");
        n.n(i).a;
    },
    ef97: function(t, e, n) {
        n.r(e);
        var i, o = n("6839"), a = n("34b1");
        for (i in a) "default" !== i && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(i);
        n("d31b");
        var r = n("f0c5"), o = Object(r.a)(a.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        e.default = o.exports;
    },
    eff7: function(t, e, i) {
        (function(t) {
            i("767a"), n(i("66fd"));
            var e = n(i("ef97"));
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(e.default);
        }).call(this, i("543d").createPage);
    },
    fae5: function(t, e, n) {
        (function(i) {
            function o(e, t) {
                var n, i = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), i.push.apply(i, n)), i;
            }
            function a(t, e, n) {
                return e in t ? Object.defineProperty(t, e, {
                    value: n,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[e] = n, t;
            }
            Object.defineProperty(e, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    var t = {
                        house: {},
                        t_user: {},
                        template: {},
                        id: 0,
                        bill: {},
                        contract: {}
                    };
                    return a(t, "house", {}), a(t, "staff", {}), t;
                },
                computed: function(e) {
                    for (var t = 1; t < arguments.length; t++) {
                        var n = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? o(Object(n), !0).forEach(function(t) {
                            a(e, t, n[t]);
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach(function(t) {
                            Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
                        });
                    }
                    return e;
                }({}, (e.default = void 0, n("26cb").mapState)({
                    isLogin: function(t) {
                        return t.user.isLogin;
                    }
                })),
                onLoad: function() {},
                onShow: function() {
                    var t = this.$Route.query;
                    this.bill.id = t.id, this.init();
                },
                onReady: function() {},
                beforeRouteLeave: function(t, e, n) {
                    console.info("leave"), n();
                },
                methods: {
                    init: function() {
                        var n = this;
                        this.$api("store.bill_detail", {
                            id: n.bill.id
                        }).then(function(t) {
                            var e;
                            0 == t.errno && (e = t.data.bill, n.bill = e, n.contract = t.data.contract, n.house = t.data.house, 
                            i.setNavigationBarTitle({
                                title: e.name
                            }), t.data.staff && (n.staff = t.data.staff, n.$store.commit("staff", t.data.staff)));
                        });
                    },
                    pay_imgs_pre: function(t) {
                        var e = this.bill.pay_imgs;
                        i.previewImage({
                            current: t,
                            urls: e
                        });
                    },
                    pay_confirm: function() {
                        var n = this;
                        i.showActionSheet({
                            itemList: [ "确认支付成功", "驳回支付" ],
                            success: function(t) {
                                console.log("选中了第" + (t.tapIndex + 1) + "个按钮");
                                var e = t.tapIndex, t = {
                                    bill_id: n.bill.id
                                };
                                t.status = 0 == e ? 6 : 1, n.$api("store.pay_confirm", t, "post").then(function(t) {
                                    0 == t.errno ? (n.$tools.toast("提交成功"), setTimeout(function() {
                                        n.init();
                                    }, 500)) : n.$tools.toast(t.msg);
                                });
                            }
                        });
                    },
                    call: function() {
                        var t = this.contract.t_tel;
                        i.makePhoneCall({
                            phoneNumber: t
                        });
                    },
                    navto_discount: function() {
                        this.$Router.push({
                            path: "/pages/store/bill/discount",
                            query: {
                                id: this.bill.id
                            }
                        });
                    },
                    navto_pay: function() {
                        this.bill, this.$Router.push({
                            path: "/pages/store/bill/pay",
                            query: {
                                id: this.bill.id
                            }
                        });
                    },
                    navto_add: function() {
                        this.$Router.push({
                            path: "/pages/store/bill/add2",
                            query: {
                                pid: this.bill.id
                            }
                        });
                    },
                    bill_qrcode: function() {
                        var e = this, t = this.bill.id;
                        i.showLoading({
                            mask: !0,
                            title: "正在加载"
                        }), this.$api("store.bill_qrcode", {
                            bill_id: t
                        }).then(function(t) {
                            i.hideLoading();
                            t = t.data.qrcode;
                            e.$refs.qrcode.show(t);
                        });
                    }
                }
            };
            e.default = t;
        }).call(this, n("543d").default);
    }
}, [ [ "eff7", "common/runtime", "common/vendor" ] ] ]);